package com.swordliu.facebook.service.base;

import com.swordliu.facebook.dao.base.BaseMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.Serializable;

/**
 * Created by SwordLiu on 2017-07-03.
 */
public abstract class BaseServiceSupport<T> implements BaseService<T> {

    protected abstract BaseMapper<T> getBaseMapper();

    @Override
    public Serializable add(T o) throws Exception {
        return getBaseMapper().insert(o);
    }

    @Override
    public boolean delete(Serializable id) throws Exception {
        return false;
    }

    @Override
    public T get(Serializable id) throws Exception {
        return null;
    }

    @Override
    public void update(T o) throws Exception {

    }
}
